package com.project.controller;

import com.project.bean.ColumnBean;
import com.project.service.IColumnService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("column")
@Api(tags = "柱状图")
public class ColumnController {
    @Autowired
    private IColumnService service;
    @ApiOperation(value = "按年份分组查询（去重）")
    @RequestMapping("findYear")
    public String[] findYear(){
        return service.findYear();
    }
    @ApiOperation(value = "按类别统计指定年份每个月每个类别销售详情总金额")
    @RequestMapping("get")
    public List<ColumnBean> get(String year){
        return service.get(year);
    }
}
